#189 Fix the env in TTY mode

Solves #189