Upgrade text-buffer to fix null exception