fixed issue of iter_loop not working