Fixed waiting for messages and catching up