Fixed another python 3 incompitability. This time in trying to index into the result of a call to keys() on a dictionary.