fixed some null stuff