Fixed bug in undelete and rm