fixed some null exception