bug fixes for directory listing