Bug fix - directory.js