Middle_Check fixed for loop iterations bug fix