Fixing a bug that was introduced in 2.8.12 that could prevent javascript from working on the front-end. Fixes #402.