Database structure fix.