Fix update dbversion check and first run