minor range check fix