clean flags