Forgot to handle statistics error in ajax