safari compatibility fix