Fixed "stdin: is not a tty warning" related issue