Javascript error occurred in the main process: easy fix