making sure all tables are set up before querying

crude fix for github issue #7