Changed LookupError for missing target to KeyError