Fix compile error in capture_tb