Fixed bug in deprecated updateStats

Last commit changed behaviour of updateStats, this fixes it.
Merge updatestats--fix-bug (#5) into master

Fixes an obvious bug that the last commit introduced.

Submitted by @netzkind