Bunch of fixes, including for issue #95