fix js data retrieval.