fixed do-display-dir behavior