Fix syntax errors in get_cycles().