Fix Javascript errors.