More fixes for creating loops