Small fix for folder check