Mocha tests fixed