Fixes for analytics