fix database conn