[#1200] Fix for failing mocha test it's because of scoping...