fixes #2035
Potential fix for #1526