Fixed move logic after changing control flow