fixes wrapping when range is 2