Fix null pointer