fixed bug on spaces in string