Fix redeclaration of variable