fixed dep delete function