better error handling in activity get stats