bug fixed when database was dropped