Fix for checking max message size