Fix some issues with analytics module.