Fixed inrange() not being called