Fixed an error when min and max integer values are equal