fixed result set merging