fix addDirective bug
Merge remote-tracking branch 'github/master'