Bug fix for Safari