deleting links now saves correctly in the database