Message emit was not being used correctly.