Fix the endless loop | StemPy Lab