Fix slider bug for Safari.