Another KeyError fixed