fixed npe and clastcast exception when scrolling