Fix bugs in db, no really.