fixed a firefox javascript issue