fixes in the limited repair computation