simplify map comparison in tests
destroy windows correctly