fixed bug on inventory initialization