proresdec: Fix end condition