fix that keyError in get_work()