Fixed bug where clicking delete failed.