Added some support for xross-browser compatibility hacks