Fixed some null issues.