another subquery fix