fix chopping between loops