Fix hanging stdin

Signed-off-by: Tibor Vass <teabee89@gmail.com>