Fixed bug in inventory delete