Fix an error when attempting to render the dir list for a new dir