Merge pull request #3678 from Segrain/master

Bugfixes.
Quickfix.