Fix database update script