Max number of messages check should be < (no =).