Fixed Infinite Loop