Fix null references.