fixed dup var declaration