Fixed #2. Handle isTTY value.