Solve duplicated js issue