defensive exception handling to make sure we get stats