Fix unused var.  Fix error path.