add safari support
fix IE bug