Improving merging databases on ManageDB

Fixed some errors while merging databases.
Fixed inserting names with single cuotes in bluedriving.db