fix bug injected by debug instrumentation and my own failure insert function declarations.