Small bugfix and some changes
Merge branch 'master' into gh-pages