Directory context bugfix