Changed HashMap to LinkedHashMap #167

cherry-pick from 1.0.x branch.
Please review #167 , and merge to master branch.

078f957b546f9103889f778184a0c548eb0aeed2