Fix bug when no primary output present.