Fix bug.
engine.lua:136: attempt to index global 'inv' (a nil value)