fix a glyph bug and minor cleanup

Change-Id: I08dc74cc34064969ca6e940942f8505985bc7236