bugfix and stats