Go out of the way to clear entities in the end