Fix various budget_period related bugs