Be defensive on displaying the query. Fixes #58

I can't reproduce this, so I'm just going to harden the code somewhat.