fixed temporary tables looking for database drops instead of table drops