Fixed firefox and chrome bugs