fixed performance issue with terrible inventory code