fix regresssion in pasted returns and spaces from input refactor