fixed some bugs on firefox