Fixed some issues with FireFox and IE