Fix text handling