Fixed file listing bugs