Fix bug in splitting empty string