Game Over after winning a battle.

I have been trying to fix this for a couple of days and i have no idea why its happening.

I have a battle that takes place in an event. If the players win, there is some talking, and then they go back to their house. If the players lose, some different talking happens and then they go back to their house.

But what is happening is, that if the players win. The talking happens, and then I get a game over screen. I have tried everything I can think of to get this to stop happening, and I still don't even know why its happing.

TIA

Here are some screen shots of the event containing the battle.
the label "exit" is inside the if loose branch of the battle processing.

you need to look carefully at the indentions of the command, you'll see that the exit label and everything after it is still a few millimeters indented to the right. That means it still is part of the if loose branch.
only the last (empty) line is back at the left start - that is where the label and everything after would have to be placed, AFTER the end of the if-loose-battleprocessing.
I don't see how either of those would give you a game over screen.

Unless it's something to do with removing Eric and any remaining party members are dead.
I'll be that's it!

I am sure the if win / if lose thing didn't help, but when i first started getting the error, I had the transfer in each of the conditions.

Edit
I put a Recover All under the exit label and it seems to have fixed the problem. Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/game-over-after-winning-a-battle.136876/