Fixed inventory fixes that were reverted earlier