bugfix: incorrectness for dumping flags