Tracked down and killed a known undefined behavior, flags wasn't being set in addprovision