made statistics context dependent, refs #5701