Fixed some loading bugs in firefox