WHILE TRUE LOOPS SOLVE AJAX ISSUES