Small bugfixes
Merge branch 'master' into gh-pages