More matching.js fixes