Fixed animation logic