fixes bug, ranges with non integers did not work as intended