Not working with stop after first loop