Fixed issue where app crashes on subdirectories