Fixes for db.