fix cycle example, fix #336