fixing argument serialization bugs