Fix for #119

Also addresses #125 (as much as is feasible)