fixed encoding, cleaned up text drawing