Added error checking while building glyphs