fixed special case for range of 1