Fix null return path bug