delete and undelete working properly