GRAS-1138 Fixed bug when switching between complex types.