Fix SQL bunch splitting