fixes for named loops