stop looping when deleting loop-range (fixes potential crash)