Fix bug calculating min/max code point