Fix problems with deleting folders (WFE-1112).