Partial fix for #296