Listen to message events correclty