Don't take result object before calling waitForDone().
Fixed inverted logic for returning true on success.
Clean-up query results.