bugfix for token replacement
Merge branch 'master' into gh-pages