fixed some stuff in dbAdapter and db