fix ping period calc