small dict change to improve py3 compatibility (also faster)