fixes for #239