fixed null pointer bug in Item