Prevent potential infinite loop situation