refs #32 Changed the query for checking table existence to limit 1