Fixed TypeError on button press with no selection, delete button will still ask for confirmation. Fixes #1