quick nullref fix for part of bugfix #11916.