Fix a bug in firefox