Misc text-related fixes