Added fixes for browser compatibility.