Fix subsplit routine