Fixed variable naming issues