Fixed bug that caused elapsedTime = 0.0 in update()