Remove variable that was declared too early

This variable should be declared where it's needed, instead of at the
top of the function. Also, it seemed to be named incorrectly.