fixed issue #13 to handle encrypted and signed messages

just letting you know change I made.