fixes for latest rust, small improvements