Didn't take into account that it was in the middle of the loop and therefore processing wouldn't have stopped immediatly