fixed errors and dynamic sizing for splitstring