Moved put_unit call to end of use_item function, instead of once in each if block