fix crash querying non-existant bucket

improper error checking generated error, but didn't return it
closes cbugg bug-707