fix some bugs like show_flag show in 1 or 0