-- fixed a bug in db initialization