improve instrumentation handling