(#6): Fix KeyError for modifying object.