Fixed Delete Function