Fix public flag/unflagging