Fix a few issues with min/max