removed an endless loop