merge ios8 safari fix from ios