fixing error when adding new flag to empty flag list.