Fixes `r.map` in the Javascript driver