Fix highlighting of topmost element