fixed elapsed time bug