Bugfix: correctly enable/disable delete button