fix active directive support
Merge branch 'master' into gh-pages