Resolving copyComponent issue with pointing to wrong object