Fix WithinRange comparision issue