Fix some problems, and add default values serializer