Fix null deref