fixed bug-declared var