fix firefox bug, thanks @s890081tonyhsu