Fixes #1710
Proper fixed for #1710