fix uncaught query case
flesh out tests
fixes from tests