I added emitter resistance and it is working now.With no emitter resistors Q1 and Q2 have a lot of voltage gain in the loop.
Without emitter resistors Q1 and Q2 provide a significant current gain which, given the R5 base resistor and R13+R22 collector load result in a high voltage gain. R5 value gives Vin to I base, Q1 Hfe gives Ib1 to Ic1 gain, Q2 Hfe gives Ib2 to Ic2 gain, and R13+R22 combined gives Ic2 to Vout. Due to Hfe variations and change with temperature and current it is often best to add an emitter resistor to provide a more predictable Vin to Ic transfer function. For Q2 a lower value of R7 would also help reduce the current gain of that stage.I added emitter resistance and it is working now.
Could you please explain more about your statement