try to stop endless loop