Added a little bit of cross-browser compatibility (IE sucks, though)