Fix issue #3: Fixed using "keys" instead of fields. The code to the real fix was checked in under issue #2