fix creation of db