fixed up handling empty string.