Fix two remaining python3 bugs.

2 More bugs that surfaced.

One with dictionary orders being different between python version, the other is another case of DeprecationWarnings being dropped.