Fixed a bug in IncomingMessageQueue