fix bug with analytics