Fix a bug that causes databases to not be created