UNDERTOW-191 Fix issue with checking the maximum size