Fixing JS settings and updating cursor comment position