fix some bugs in items creation