fixed a bug for FF