fixed error logging a bad variable name