prevent infinite loop