Fix creation of database