updated repair check for the case when repair limit is exceeded