fixing some null refs