add Terminate to input framework to prevent potential shutdown race-conditions.