Move emit statement back to original position