Added changes to avoid delete problem.