fix database problem