Fixes game loop lag calculation