Fixes glyphs with invalid flags