Fix errors on database creation
Merge branch 'master' into fac24