bufix: Selecting templates by clicking the icon caused a crash. Closes #120.