Fixed issues with integer max in settings.

See title