Fixed some bugs in various browsers