Fixing flag limit in the UI