case 1683 - Fix for JS so it doesnt crash the whole site.
Merge branch 'case-1683' into develop