Fixed bug in split() when string ends with separator