remove redundant flags