Bug fix

Hastily committed changes before debugging and forgot to update a couple of
variable names. That's fixed now.

Signed-off-by: Ted Gibbons <ted.codes@gmail.com>