Fixed copy (if input vectors are cuda, it was failing)