numerous fixes for latest rust