Fix null-pointer