fix slider behaviour