Better error message.
Fix typo in var name that isn't used.