fixed a bug with the slider (hardcoded initial value)