Fix bug in variable naming