Fix analytics bug