Fixed a error which caused directories not to be shown