fixed bug in delete and test case, docs