fixed slider to use range correctly