fixed 3 python3 errors due to random dict ordering