fixes #3138 . Update istatistics after operation is run and  before resp...

...onse is send to client
Now, are we calling ```afterProcess()``` before actual process which is ```endpoint.sendResponse(...)``` ? If that is the case, it seems not straightforward to me.