Fixed problems with spaces in input