Move 'fixRangeOverflow' into a try catch