Add max to messages collection