fixed error in Split func