Safari fix suggested by James