Fixing message receiving bug