Fixed nested queries