add verification of terminator instructions, fix breakage