Fix many problems with esx inventory. closes #2250