use static pointer rather than reference to avoid issues when accessing datapath on exit