Fix for #98(and the duplicate #114)