detach loop for inline returns