Fixed a error which caused directories not to be shown if there was more than 1 directory