extra bug fixes for directory-as-index