fixed some null warnings