metrics should be reset only in proper places