fixed bugs in serialization code for keyword parameters