Fixed more bugs with directories and dead links