Fix problem with refresh on Safari iOS 8