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

...onse is send to client
i prefer only fixing the test and leaving the rest as-is.