clean flags on run