Update db and fix importDb