fix bug at receive() in MessagingService