fixed safari bug on smooth scroll function