fix bug in delete tenant