fix js mistake, refs #3599