fix compatibility bug with firefox