fixed some null issues
tests update