rebuild JS with fault tolerance