fix firefox and some bug