fixed the emit