bug fix for database setup