reset flag after checking results