fixed bugs found by crosscloud.js npm test suite