Fix error variable name

Closes #2.