bug in reduce printing