Improve cross-browser compatibility