Bugfixes around instrumentation.