bugfix for directory