Changed emit to 1 and 0