fixed javascript editing