fixed error in split, string was not finished with null byte