FLUID-4947: added some fixes to text split and error handling.