Fix duplication of outputs