Fixed error in message receiving