Moved the inventory close later in the world change handling to hopefully resolve #161