Fix for #795

Related to #795