Fix collection serialization.