Cross-browser bug fixes