Avoid shallow copy

Jira Issue: WP-123