fix circular js objs

Jira-issue: WP-1024