fixed error in timeval initialization