fix JS execution in CAM.js