removed infinite loop deteciton