fix cycle index