Fix JS for local retrieval.