fixes problem cause by loop over Hash => not preserve ordering