fixed almost all inventory bugs, just one more left.