Fix for nonstandard Safari behavior.
Merge pull request #1 from 722C/master

Fix for nonstandard Safari behavior.