fix text functions