NPE fix for corrupt folder