Fixed bug with deleting tables.