Fixed loops' exit variables