Fixed a bug that resulted from confusing variable names.