fix bug for wrong time calculation