fixing bugs in coverage.js module