Analytics bug fixes