Fixed some possible inventory issues.