Fixed bug in encoding and decoding calls.