Fix bug with mis-named variable