Improved handling of message timeouts.