Fixed safari compatibility