Merge pull request #7332 from Segrain/master

Bugfixes.