inventory refactor
fix merge problem