Fixed a few browser incompatibilities