fix some null refs