Fixed crashing inventory bug