Fix for #824