repairs for r.js