fixed a problem where ranges with values other than integers would crash