fix cap on encounter.js