fixed a bug for firefox