fixed bug when pairs are passed as arguments to fun structures for which the domains don't factorize.
Merge remote-tracking branch 'origin/dev' into dev