Fixed an issue where the JS was printing some uncaught errors to the
console.