Fix horrible message queue implementation