Fixed animation timing issue