fix panic when stats have not been called