correct the failed pr rebuild logic