Fixed attribute bug in typeclass swap.