fixed the first loop position