Merge small js fixes from hotfix/next