solve NullPointeerException