fixed CheckRange check