cross-browser compatibility fixes