updates to fix database problems