Fixed bug in marshalling code.