MessageQueue deadlock fix