Refine loop operation.