Fix database creation