Avoid error when clicking `delete` repeatedly