Revert "Fix bug when using safari."

This reverts commit 0079c48f32e6bbbc665c47c879ca67cb2445cb31.
Revert "Revert "Fix bug when using safari.""

This reverts commit e7b93b4d79edc5d2afcc46f76b4ec802cd6c6ab9.