remove usless end_loop