Some minor bugs fixed
Merge pull request #1 from dd5xl/master

Minor bugs fixed in key conversion