fixed some bugs in dirigent.