Multiple table fix

Fix to allow more than one table to be used in same db file.