Fixed bug to update the table on delete