fixed a couple bugs with analytics