Fix typo. Fix proper undefined var check.