fixed column logic in inventory script.