fixes in mock.js