Fix refs to nulls