Partial fix for #158