fix compilation bugs for terminating handler check and TODO handler check