fixed variable redeclaration