fixed bug in capturing glyphs