fixed type casting errors in split and updated split on root

hurr durr whoever wrote this code is a dum dum