reverted #319, broke all subquery generation