fixed new flag problems