Fix bug with Safari and iOS