fix/improvement for analytics