Fix problems with types.Sum