fix bug assigning clone to currentElement - clone is undefined