Found new logic that fixes Safari bugs.