Fix bug caused by virtual directories.