Fixed problem that caused keys to not be converted properly. Related to issue #131.