remove unnecessary flags