Fix another bug that happens when output is not set.