fix inverse animation logic