Fix typo and stupid logic