Fixing bug with slider