Safari works only when refresh is called