fix bug in serializer in mllib