fixing animations out of sync error.