fixing a bug for status emit