fix read time from header