fix some js bug