Removed usage of iterkeys for python3