fix bug with slider in Safari