Fixed the problem where doing a delete will fail.