Fix for #845