Ensure capabilities response contains <query> node before trying to use it. Closes #29
Fix indentation so it's consistent.
Merge pull request #30 from Daniel15/issue-29-fix

Ensure capabilities response contains <query> node before trying to use it