Fixed database update