Simple fix to prevent null reference error in main JS, see #196