index subdirectories bugfix