Fix for nonstandard Safari behavior.