changed units to encode properly in encodeAction() method
Merge pull request #2 from jayrobin/unit_encoding

changed units to encode properly in encodeAction() method