partial fix for #832