db, minor fixes