more null ref fix