prevent errors/infinite loops