Fix variable name, closes #597