fix infinite exec loop