Fix for #682