bugfixed: failed to store flagged