Fix infinite loop
Fix typo