manageDB fixes

- now it creates a new db correctly
- more fixes in the merging
- some fixes when dealing wiht incompleate data from old dbs