General changes for cross-browser compatibility