Fix incorrect variable name for error