fix private flag setting