fixed bug in test_encoding_decoding that prevented the decoded version from being checked