fixed vulnerability on the range handling