Stats bug fixes