Fix JS error in adding comments