Reset break_flag after cancelled loop