bug fix

fixed two bugs where I was referring to the wrong part of the dict
hierarchy