fix stupid loop mistake