eliminate infinite loop