Fixed bug with elapsed time