Fixes set stat name bug

Fixes #39

Stats reporting to the wrong bucket. The stat name was getting set in a called function which changed the intended stat name to report to.