Bug fixes for Safari