Fixed variable naming conflicts