Fix for copyTo bug.