some flags and clean