fix ending case when after -1 outpar