bug fix for database creation