Fix ranges