partial fix for #51