substring bugfix
Merge branch 'master' into gh-pages