Minor changes to capture.js