Fixed return query