fix js for read layer