Analytics bug fix