fixed bug for deleting folders