fix scheduling of looping passes