fixed incorrect ranges