event loop: fix parsing queued messages