fixed error with analytics