Merge pull request #7254 from Segrain/master

Bugfixes.