Bug fix: variable mismatch