Fix clone bug and handle edge case where an elems class is removed before the elem
Fix clone bug and handle edge case where an elems class is removed before the elem

witheve/Eve,shamrin/Eve,nmsmith/Eve,nmsmith/Eve,witheve/Eve,witheve/Eve,nmsmith/Eve,shamrin/Eve,shamrin/Eve