more fixes for #594