fix serializer bugs