ECMS-4332: Fix some js bug on ECMUtils