bug fix in flags