fix error occurs on firefox