fix range to xrange