Bugfix, check correct exception for table exists