Fix for #841