Fixed cp selfcopy and parsing whitespaces