fixing a infinite process loop.