Fix minor bug in looting chests and managing inventory