Bugfix in the reset function
Merge branch 'master' into gh-pages