Fix element-not-present bug.