fix marshalling of int32 and int64