fix optimization of subqueries