fixing flag submission