Fix listing directory contents