bug fix in use and delete program