Removing dangling instrumentation