Add fix from branch 3.4
Merge pull request #43 from aspangaro/3.5

Add fix from branch 3.4