Various more fixes for #100
Various more fixes for #100