Revert "Fixed max check"

This reverts commit cbd3bfd091c6c562715e17e1c62e2296692e85c7.