Fix typo and undefined value