Fixed javascript execution bug.