fixed bug which was used to save stats also in cache-mode