fix analytics bug