fixed javascript bug.