Improved sorting by takestamp and reset for older version (#152)