physics, lua: fix occasional exit glitch, workaround lua's lies

Lua's been lying to us, fellas. Telling us about objects that don't exist. That ain't good, so we "fixed the glitch". We subtract 2 objects to workaround the fact that Lua gives us nonexistant objects. I'll have to think of a better way to do this.

On another note, I fixed the exit order. No idea what I was on when writing it. It's so trivial. Well, when I'm the only one who laid eyes on that bit of code it's understandable.