Variable sort-out

Gets rid of one reference error and uses the unused variable.