added condition to dissolve_country query and fixed tests