Bug fix: animation can't work on Firefox