Fixing sinon spy.