Fix bug in JavaScript that causes the comments form to misbehave