more fixes for #158