Fixed sid type issue in delete