fixed bug reported by Gordan
Merge branch 'master' into release/1.4