Build fix up, reintroduction of invoke count reset