Fixed bug in input function when using stdin