Fix the serialization of the querysets