Remove unnecessary flags.