fixed javascript bug, missing var.