fix issue with bad calculation for stats by time, fixes #84