Fixed Next Integer Bug