fixed compatibility with firefox