fixed js generator