fix directory listing issue
add reference and get back to previous listing code