Don't allow infinite loops