fixed js optimize issue