Fixed bug in external directories.