How to Prevent and Resolve a Main Number Looping Issue