fix for #1598
Merge pull request #1630 from piquadrat/feature/fix-1598

fix for #1598