Changed split_index to signed so it can catch errors.