Fixed the serializer referencing undefined variable "aggregate".