safari compatibility fixes