Fix crash when running "createdb"