Handle return part of query