correct slider's behavior