Merge pull request #2647 from hardening/fix_message_queue