Fixed safari compatbility