cycle fixing implemented