More modified in delete folder and fixed 500 issue.