inventory fix (issue #32)