Fixed a weird way of implementing splitOn.