Text formatting correction