Fixes #23 variable name mismatch after refactoring fixed