Fix Safari compatibility issue.