Bug fix for inventory speed inprovement.