Fixes bug with top-level subdirectories