Changed inventory_owns condition from string to integer