fixed weird error with the cycle
fixed weird error with the cycle