Fixed bug of not reading line and cutting of input at whitespace