Improvement (but not a fix) for #248