fix js error bug
code refine