Fixed some test with maxMessages.