Fix for cyclic type serialization