fixed flip to grid for firefox.