fixes infinite pickup bug in inventory