reset flag after each break