Fixed bug concerning leaf item selection.