bux fix in time computation
fix bug when data are all flagged