Merging js fixes to attempt to fix iOS issue.