fixes infinite pickup bug in inventory

fixes #953