Fixed database restoration