fix console error on firefox