Fixed wrong calculation of elapsed seconds.