fix few js bug.