Fix flags issue