fixed flip glitch with firefox and other browsers