Changed the way an off-by one risk was handled