Bug fixes to local analytics