Fixed problems around DB.