Ok, so no crash - just my misunderstanding due to the topic title.

I'll check if the exiting has a particular reason. Possibly it has, otherwise we'll modify the program so that it only removes the entity and continues.