revert changes for isTTY